using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._PointCloud._Classification
{
    /// <summary>
    /// <para>Classify LAS Ground</para>
    /// <para>Classifies ground points from LAS data.</para>
    /// <para>根据 LAS 数据对地面点进行分类。</para>
    /// </summary>    
    [DisplayName("Classify LAS Ground")]
    public class ClassifyLasGround : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ClassifyLasGround()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_las_dataset">
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process. Only the last return of LAS points with class code values of 0, 1, and 2 will be evaluated.</para>
        /// <para>要处理的 LAS 数据集。仅评估类代码值为 0、1 和 2 的 LAS 点的最后返回值。</para>
        /// </param>
        public ClassifyLasGround(object _in_las_dataset)
        {
            this._in_las_dataset = _in_las_dataset;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Classify LAS Ground";

        public override string CallName => "3d.ClassifyLasGround";

        public override List<string> AcceptEnvironments => ["extent", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_las_dataset, _method.GetGPValue(), _reuse_ground.GetGPValue(), _dem_resolution, _compute_stats.GetGPValue(), _extent, _boundary, _process_entire_files.GetGPValue(), _out_las_dataset, _update_pyramid.GetGPValue()];

        /// <summary>
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process. Only the last return of LAS points with class code values of 0, 1, and 2 will be evaluated.</para>
        /// <para>要处理的 LAS 数据集。仅评估类代码值为 0、1 和 2 的 LAS 点的最后返回值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_las_dataset { get; set; }


        /// <summary>
        /// <para>Ground Detection Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the method that will be used to detect ground points.</para>
        ///   <bulletList>
        ///     <bullet_item>Standard Classification—This method has a tolerance for slope variation that allows it to capture gradual undulations in the ground's topography that would typically be missed by the conservative option but not capture the type of sharp reliefs that would be captured by the aggressive option. This is the default.</bullet_item><para/>
        ///     <bullet_item>Conservative Classification— When compared to other options, this method uses a tighter restriction on the variation of the ground's slope that allows it to differentiate the ground from low-lying vegetation such as grass and shrubbery. It is best suited for topography with minimal curvature.</bullet_item><para/>
        ///     <bullet_item>Aggressive Classification— This method detects ground areas with sharper reliefs, such as ridges and hill tops, that may be ignored by the Standard Classification method. This method is best used in a second iteration of this tool with the Reuse existing ground parameter checked. Avoid using this method in urban areas or flat, rural areas, as it may result in the misclassification of taller objects—such as utility towers, vegetation, and portions of buildings—as ground.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于检测接地点的方法。</para>
        ///   <bulletList>
        ///     <bullet_item>标准分类 - 此方法具有对坡度变化的容差，因此可以捕获地面地形中的渐变起伏，保守选项通常会忽略这些起伏，但无法捕获激进选项将捕获的尖锐地貌类型。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>保守分类 — 与其他选项相比，此方法对地面坡度的变化使用更严格的限制，使其能够将地面与草地和灌木丛等低洼植被区分开来。它最适合曲率最小的地形。</bullet_item><para/>
        ///     <bullet_item>主动分类 — 此方法检测具有更清晰地貌的地面区域，例如山脊和山顶，标准分类方法可能会忽略这些区域。此方法最好在此工具的第二次迭代中使用，并选中重用现有地面参数。避免在城市地区或平坦的农村地区使用此方法，因为它可能会导致将较高的物体（例如公用设施塔、植被和建筑物的一部分）错误地归类为地面。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Ground Detection Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _method_value _method { get; set; } = _method_value._STANDARD;

        public enum _method_value
        {
            /// <summary>
            /// <para>Standard Classification</para>
            /// <para>Standard Classification—This method has a tolerance for slope variation that allows it to capture gradual undulations in the ground's topography that would typically be missed by the conservative option but not capture the type of sharp reliefs that would be captured by the aggressive option. This is the default.</para>
            /// <para>标准分类 - 此方法具有对坡度变化的容差，因此可以捕获地面地形中的渐变起伏，保守选项通常会忽略这些起伏，但无法捕获激进选项将捕获的尖锐地貌类型。这是默认设置。</para>
            /// </summary>
            [Description("Standard Classification")]
            [GPEnumValue("STANDARD")]
            _STANDARD,

            /// <summary>
            /// <para>Conservative Classification</para>
            /// <para>Conservative Classification— When compared to other options, this method uses a tighter restriction on the variation of the ground's slope that allows it to differentiate the ground from low-lying vegetation such as grass and shrubbery. It is best suited for topography with minimal curvature.</para>
            /// <para>保守分类 — 与其他选项相比，此方法对地面坡度的变化使用更严格的限制，使其能够将地面与草地和灌木丛等低洼植被区分开来。它最适合曲率最小的地形。</para>
            /// </summary>
            [Description("Conservative Classification")]
            [GPEnumValue("CONSERVATIVE")]
            _CONSERVATIVE,

            /// <summary>
            /// <para>Aggressive Classification</para>
            /// <para>Aggressive Classification— This method detects ground areas with sharper reliefs, such as ridges and hill tops, that may be ignored by the Standard Classification method. This method is best used in a second iteration of this tool with the Reuse existing ground parameter checked. Avoid using this method in urban areas or flat, rural areas, as it may result in the misclassification of taller objects—such as utility towers, vegetation, and portions of buildings—as ground.</para>
            /// <para>主动分类 — 此方法检测具有更清晰地貌的地面区域，例如山脊和山顶，标准分类方法可能会忽略这些区域。此方法最好在此工具的第二次迭代中使用，并选中重用现有地面参数。避免在城市地区或平坦的农村地区使用此方法，因为它可能会导致将较高的物体（例如公用设施塔、植被和建筑物的一部分）错误地归类为地面。</para>
            /// </summary>
            [Description("Aggressive Classification")]
            [GPEnumValue("AGGRESSIVE")]
            _AGGRESSIVE,

        }

        /// <summary>
        /// <para>Reuse existing ground</para>
        /// <para><xdoc>
        ///   <para>Specifies whether existing ground points will be reclassified or reused.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Existing ground points will be reclassified. Points that are not found to be a part of the ground will be reassigned a class code value of 1, which represents unclassified points. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Existing ground points will be accepted and reused without scrutiny and contribute to the determination of unclassified points.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是重新分类还是重用现有地面点。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中—将对现有地面点进行重新分类。未被发现是地面一部分的点将被重新分配一个类代码值 1，该值表示未分类的点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 现有地面点将不经审查地被接受和重复使用，并有助于确定未分类的点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reuse existing ground")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _reuse_ground_value _reuse_ground { get; set; } = _reuse_ground_value._false;

        public enum _reuse_ground_value
        {
            /// <summary>
            /// <para>REUSE_GROUND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REUSE_GROUND")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>RECLASSIFY_GROUND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("RECLASSIFY_GROUND")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>DEM Resolution</para>
        /// <para>A distance that will result in only a subset of points being evaluated for classification as ground, thereby making the process faster. Consider using this parameter when a faster method for generating a DEM surface is needed. The minimum distance is 0.3 meters, but the specified distance must be at least 1.5 times the average point spacing of the lidar data for this process to take effect.</para>
        /// <para>该距离将导致仅评估一部分点以分类为地面，从而使该过程更快。当需要更快的方法来生成 DEM 曲面时，请考虑使用此参数。最小距离为 0.3 米，但指定的距离必须至少为激光雷达数据平均点间距的 1.5 倍，该过程才能生效。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("DEM Resolution")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _dem_resolution { get; set; } = null;


        /// <summary>
        /// <para>Compute statistics</para>
        /// <para><xdoc>
        ///   <para>Specifies whether statistics will be computed for the .las files referenced by the LAS dataset. Computing statistics provides a spatial index for each .las file, which improves analysis and display performance. Statistics also enhance the filtering and symbology experience by limiting the display of LAS attributes, such as classification codes and return information, to values that are present in the .las file.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Statistics will be computed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Statistics will not be computed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否为 LAS 数据集引用的 .las 文件计算统计数据。计算统计为每个 .las 文件提供空间索引，从而提高分析和显示性能。统计数据还通过将 LAS 属性（如分类代码和返回信息）的显示限制为 .las 文件中存在的值来增强过滤和符号系统体验。</para>
        ///   <bulletList>
        ///     <bullet_item>选中—将计算统计数据。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中—不计算统计数据。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compute statistics")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _compute_stats_value _compute_stats { get; set; } = _compute_stats_value._true;

        public enum _compute_stats_value
        {
            /// <summary>
            /// <para>COMPUTE_STATS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("COMPUTE_STATS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_COMPUTE_STATS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_COMPUTE_STATS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Processing Extent</para>
        /// <para><xdoc>
        ///   <para>The extent of the data that will be evaluated.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—The extent will be based on the maximum extent of all participating inputs. This is the default.</bullet_item><para/>
        ///     <bullet_item>Union of Inputs—The extent will be based on the maximum extent of all inputs.</bullet_item><para/>
        ///     <bullet_item>Intersection of Inputs—The extent will be based on the minimum area common to all inputs.</bullet_item><para/>
        ///     <bullet_item>Current Display Extent—The extent is equal to the visible display. The option is not available when there is no active map.</bullet_item><para/>
        ///     <bullet_item>As Specified Below—The extent will be based on the minimum and maximum extent values specified.</bullet_item><para/>
        ///     <bullet_item>Browse—The extent will be based on an existing dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将评估的数据范围。</para>
        ///   <bulletList>
        ///     <bullet_item>默认值 - 范围将基于所有参与输入的最大范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>输入并集 - 范围将基于所有输入的最大范围。</bullet_item><para/>
        ///     <bullet_item>输入交点 - 范围将基于所有输入共有的最小面积。</bullet_item><para/>
        ///     <bullet_item>当前显示范围 - 范围等于可见显示。当没有活动地图时，该选项不可用。</bullet_item><para/>
        ///     <bullet_item>如下所述 - 范围将基于指定的最小和最大范围值。</bullet_item><para/>
        ///     <bullet_item>浏览 - 范围将基于现有数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Processing Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _extent { get; set; } = null;


        /// <summary>
        /// <para>Processing Boundary</para>
        /// <para>A polygon feature that defines the area of interest to be processed.</para>
        /// <para>定义要处理的感兴趣区域的面要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Processing Boundary")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _boundary { get; set; } = null;


        /// <summary>
        /// <para>Process entire LAS files that intersect extent</para>
        /// <para><xdoc>
        ///   <para>Specifies how the area of interest will be used in determining how .las files will be processed. The area of interest is defined by the Processing Extent parameter value, the Processing Boundary parameter value, or a combination of both.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Only LAS points that intersect the area of interest will be processed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—If any portion of a .las file intersects the area of interest, all the points in that .las file, including those outside the area of interest, will be processed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在确定如何处理 .las 文件时如何使用感兴趣区域。感兴趣区域由“处理范围”参数值、“处理边界”参数值或两者的组合定义。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中—仅处理与感兴趣区域相交的 LAS 点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 如果 .las 文件的任何部分与感兴趣区域相交，则将处理该 .las 文件中的所有点，包括感兴趣区域之外的点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Process entire LAS files that intersect extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _process_entire_files_value _process_entire_files { get; set; } = _process_entire_files_value._false;

        public enum _process_entire_files_value
        {
            /// <summary>
            /// <para>PROCESS_ENTIRE_FILES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PROCESS_ENTIRE_FILES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>PROCESS_EXTENT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PROCESS_EXTENT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output LAS Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_las_dataset { get; set; }


        /// <summary>
        /// <para>Update pyramid</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the LAS dataset pyramid will be updated after the class codes are modified.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The LAS dataset pyramid will be updated. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The LAS dataset pyramid will not be updated.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定修改类代码后是否更新 LAS 数据集金字塔。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将更新 LAS 数据集金字塔。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中—LAS 数据集金字塔将不会更新。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update pyramid")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _update_pyramid_value _update_pyramid { get; set; } = _update_pyramid_value._true;

        public enum _update_pyramid_value
        {
            /// <summary>
            /// <para>UPDATE_PYRAMID</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("UPDATE_PYRAMID")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_UPDATE_PYRAMID</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_UPDATE_PYRAMID")]
            [GPEnumValue("false")]
            _false,

        }

        public ClassifyLasGround SetEnv(object extent = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(extent: extent, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}